{ext->class_function class="clients" func="get_page_permission" parent=$data.page.id assign="permissions_list"}
{ext->class_function class="clients" func="get_clients_group" assign="groups_list"}
{ext->countArray array=$groups_list assign="groups_count"}
{if $groups_count > 0}
<form name="group_list" action="index.php" enctype="multipart/form-data" method="post">
<input name="admin" type="hidden" value="1">
<input name="module" type="hidden" value="clients">
<input name="mod" type="hidden" value="client">
<input name="act" type="hidden" value="assign_group_permission">
<input name="parent" type="hidden" value="{$data.page.id}">
<input name="referer" type="hidden" value="{ext->get_referer}">
<!-- <table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td height="50" bgcolor="#FFFFFF" align="center" style="padding:15px">{t t='Čia galite pasirinkti kurios klientų grupės turės priėjimą prie šio katalogo'}</td>		
	</tr>
</table> -->
	<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
		<tr>		
			<td  height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="70">{t t='Žymėjimas'}</td>	
			<!-- <td  height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="50">ID</td>						
			<td  height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="50">level</td>					-->	
			<td style="font-size:9px; color:#4C4C4C; text-align:left; padding:0px 0px 0px 10px">{t t='Pavadinimas'}</td>			
		</tr>
	</table>
	<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
			<td height="1" bgcolor="#D6DBDE"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
		</tr>
	</table>
	{foreach from=$groups_list item="el"}
		<!-- * -->
		<table width="100%" cellpadding="0" cellspacing="0">
			<tr>
				<td height="1" bgcolor="#FFFFFF"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
			</tr>
		</table>
		<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#F4F6F7">
			<tr>			
				{assign var="id" value=$el.id}				
				<td height="22" width="70" align="center" style="border-right:1px solid #D6DBDE"><input name="ids[]" value="{$el.id}" {if $permissions_list.$id} checked{/if} type="checkbox"></td>			
				<!-- <td width="50" align="center" style="border-right:1px solid #D6DBDE">{$el.id}</td>	
				<td width="50" align="center" valign="middle" style="border-right:1px solid #D6DBDE">{if $el.parent == 0}1{else}2{/if}</td> -->
				<td style="padding:0px 0px 0px {if $el.parent}30px;{else}10px; font-weight:bold;{/if} border-right:1px solid #D6DBDE"><!-- <a href="index.php?admin=1&tpl_client_module=group_form&group_id={$el.id}" class="blackNoUnderline"> -->{$el.name}</td>
			</tr>
		</table>
		<table width="100%" cellpadding="0" cellspacing="0">
			<tr>
				<td height="1" bgcolor="#D6DBDE"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
			</tr>
		</table>
		<!-- /* -->
	{/foreach}
	<table width="100%" cellpadding="0" cellspacing="0">
					<tr>
						<td bgcolor="#FFFFFF" height="5">						
						<input onClick="document.forms['group_list'].submit();" type="button" value="{t t='Išsaugoti pakeitimus'}" class="defaultFormButton" style="margin:10px ">
						</td>		
					</tr>
				</table>
	</form>
{else}
<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td height="50" bgcolor="#FFFFFF" align="center" style="padding:15px">{t t='Nėra nei vienos grupes'}</td>		
	</tr>
</table>
{/if}

